Skip to content

Conversation

courtney-bryce-hilton
Copy link

@courtney-bryce-hilton courtney-bryce-hilton commented Aug 8, 2025

This PR updates the jspsych-html-video-response and jspsych-html-audio-response plugins to support additional ways of saving audio/video data beyond storing base64-encoded text in the response field.

The new options are:

  • Save locally – Downloads the recorded file directly to the participant’s default Downloads folder. (Web browsers do not allow arbitrary file system access from web pages, so saving elsewhere is not possible.) The saved filename is a randomly generated UUID, which is also stored in the response field of the jsPsych data. This allows the file to be linked to its trial data later, while keeping the file itself de-identified (at least at the level of the filename).

  • Save via API – Uploads the recorded file to a specified API endpoint. The endpoint is expected to return the filename (or unique ID) it uses to store the file. This value will be stored in the response field of the jsPsych data. In most cases, I'd recommend generating a random UUID filename server-side for this, but other approaches are also possible.

Because API uploads may take a few seconds, the plugin displays a loading spinner during the upload. The accompanying text can be customised via the upload_wait_message parameter.

Copy link

changeset-bot bot commented Aug 8, 2025

⚠️ No Changeset found

Latest commit: 6c40d04

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant